<?php
	session_start();
    require_once('define.php');
	define('DS',DIRECTORY_SEPARATOR);
	//系统根目录
	define('ROOT',dirname(dirname(__FILE__)));
	require_once(ROOT.DS.'core'.DS.'App.class.php');
	echo "var _ctx='".CONTEXT_PATH."',_tpl='".TPL_PATH."';";
	
	//输出用户具备的权限
	$user = core\App::session('user');
	if($user!=null){
		echo "var _keys='".$user->keys."';";
	}else{
		echo "var _keys='';";
	}
	//上传文件用到参数封装
	$timestamp = time();
	echo "_timestamp=$timestamp;_timestamp_md5='".md5('unique_salt' . $timestamp)."';";
	echo "_session_name='".session_name()."';_session_id='".session_id()."';";
	echo "_upload_size='".UPLOAD_SIZE."';";
	echo "_is_admin=".$_SESSION['user']->is_admin.";";
	require_once('menu.js');
?>
